using UnityEngine;

[RequireComponent(typeof(UIWidget))]
[ExecuteInEditMode]
public class DublicateColorSprite : MonoBehaviour
{
	public UIWidget dublicateColorWidget;

	private UIWidget curWidget;

	private void OnEnable()
	{
		curWidget = GetComponent<UIWidget>();
		LateUpdate();
	}

	private void LateUpdate()
	{
		if (dublicateColorWidget != null)
		{
			curWidget.color = dublicateColorWidget.color;
		}
	}
}
